package kochkurve;

import ch.aplu.turtle.*;

public class Kochkurve {
	
	private Turtle tu;
	
	public Kochkurve() {
		tu = new Turtle();
		tu.setPos(-100, 0);
		tu.hideTurtle();
		tu.right(90);
	}
	
	public void zeichen(double laenge) {
		if(laenge > 3) {
			zeichen(laenge/3);
			tu.left(60);
			zeichen(laenge/3);
			tu.right(120);
			zeichen(laenge/3);
			tu.left(60);
			zeichen(laenge/3);
		} else {
			tu.forward(3);
		}
	}
	
	public static void main(String[] args) {
		Kochkurve k = new Kochkurve();
		k.zeichen(200);
	}

}
